package org.jeecg.activiti.task;

import lombok.SneakyThrows;
import net.bytebuddy.asm.Advice;
import org.activiti.engine.delegate.*;
import org.jeecg.activiti.service.IActHiModelFormDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import rog.jeecg.mybatis.mapper.PmProjectMapper;
import rog.jeecg.mybatis.sever.ISeverMapper;
import rog.jeecg.mybatis.sever.ipm.SeverMapperIpm;
import rog.jeecg.mybatis.util.SpringUtil;

import java.util.Map;

/**
 * @文件名: org.jeecg.zhensi.task
 * @创建用户: MagicJava
 * @项目名: jeecg-boot-origin-master
 * @date 2022/5/18 15:51
 */

@Controller
public class TaskListTask implements TaskListener  {

    SeverMapperIpm severMapperIpm;
    @SneakyThrows
    @Override
    public void notify(DelegateTask delegateTask) {

        String code= (String)delegateTask.getVariableInstances().get("project_code").getValue();
        severMapperIpm=SpringUtil.getBean(SeverMapperIpm.class);
        PmProjectMapper pmProjectMapper= severMapperIpm.getpmProjectMapper();

        Map<String,String> mapList=pmProjectMapper.queryByCode(code);

            try {
                throw new Exception("a");
            } catch (Exception e){
                throw new Exception("a");
            }

    }
}
